const {EventEmitter} = require("events")


function Radio(station) {

    let self = this
    for (let m in EventEmitter.prototype) {
        self[m] = EventEmitter.prototype[m]
    }
    // 延迟 0 秒发出 play 事件
    setTimeout(() => {
        self.emit('play', station)
    }, 0)

    // 延迟 5 秒发出 stop 事件
    setTimeout(() => {
        self.emit('stop', station)
    }, 5000)
}


module.exports = Radio